package org.example.common.response;

/**
 * enum用于定义java枚举类型
 */
public enum ResponseEnum {
    //所有枚举出来的对象写从第一行开始写
    SUCCESS("000000","一切ok"),
    DB_ERROR("000001","数据库异常"),
    SERVER_ERROR("000002","服务器异常"),
    USER_NOT_EXIST("000003","用户不存在"),
    PASSWORD_INVALID("000004","密码错误！");
        public String getMsg() {
            return msg;
}

    public String getCode() {
        return code;
    }

    private String code;
    private String msg;

    /**
     *
     * 枚举类型的构造方法默认是private私有的
     *
     */
    ResponseEnum(String code,String msg){
        this.code=code;
        this.msg=msg;
    }
}
